{% extends 'corecode/base.html' %}
{% load widget_tweaks %}


{% block title %}
  Select all the subjects you want to create
{% endblock title %}


{% block content %}


  <p>You selected <b>{{ count }} students</b> from the previous page.</p>

  <form method="POST">
    {% csrf_token %}

    {{ form.non_field_errors }}

    <div class="form-group row">
      {{ form.session.errors }}
      <label class="col-2" for="{{ form.session.id_for_label }}">{{ form.session.label_tag}}</label>
      <div class="col">{{ form.session | add_class:"form-control" }}</div>
    </div>

    <div class="form-group row">
      {{ form.term.errors }}
      <label class="col-2" for="{{ form.term.id_for_label }}">{{ form.term.label_tag}}</label>
      <div class="col">{{ form.term | add_class:"form-control" }}</div>
    </div>
    <div class="form-group row">
      {{ form.subjects.errors }}
      <label class="col-2" for="{{ form.subjects.id_for_label }}">{{ form.subjects.label_tag}}</label>
      <div class="col">{{ form.subjects | add_class:"form-check-input" }}</div>
    </div>

    <input type="hidden" name="finish" value="True">
    <input type="hidden" name="students" value="{{ students }}">

    <input type="submit" class="btn btn-success" value="Create">
  </form>

{% endblock content %}
